"""
Case Type   : Compatibility
Case Name   : stmt_name参数类型进行验证;部分测试点合理报错
Create At   : 2024/10/14
Owner       : liu-tong-8848
Description :
              1.stmt_name参数为数字类型
              2.stmt_name参数为字母
              3.stmt_name参数为汉字
              4.stmt_name参数为特殊符号
              5.stmt_name参数为特殊值
              6.stmt_name参数为关键字
              7.stmt_name参数为数字、字母混合
              8.stmt_name参数为符号、字母混合
              9.stmt_name参数为汉字、字母混合
              10.stmt_name参数为汉字、符号混合
              11.stmt_name参数为汉字、数字混合
              12.stmt_name参数为数字、符号混合
              13.stmt_name参数为汉字、符号、数字、字母混合
              14.stmt_name参数为时间类型
              15.清理环境
Expect      :
              1.合理报错
              2.参数名带引号时，合理报错
              3.参数名带引号时，合理报错
              4.合理报错
              5.合理报错
              6.合理报错
              7.参数名带引号或者参数以数字开头时，合理报错
              8.合理报错
              9.参数名带引号时，合理报错
              10.合理报错
              11.参数名带引号或者参数以数字开头时，合理报错
              12.合理报错
              13.参数名带特殊符号或者参数以数字开头时或者带引号时，合理报错
              14.合理报错
              15.清理环境成功
History     :
"""

import os
import unittest

from testcase.utils.CommonSH import CommonSH
from testcase.utils.Constant import Constant
from testcase.utils.Logger import Logger
from yat.test import Node

class SQL(unittest.TestCase):
    def setUp(self):
        self.log = Logger()
        self.Constant = Constant()
        self.primary_sh = CommonSH('PrimaryDbBmode')
        self.db_user_node = Node(node='PrimaryDbBmode')

    def test_add_dimension(self):
        self.log = Logger()
        self.log.info(f'-----{os.path.basename(__file__)} start-----')
        step1 = 'step1:stmt_name参数为数字类型 expect:合理报错'
        self.log.info(step1)
        prepare_sql = "prepare 1 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step1)
        prepare_sql = "prepare 0 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step1)
        prepare_sql = "prepare -1 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step1)
        prepare_sql = "prepare 123.456 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step1)
        prepare_sql = "prepare '111' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step1)
        prepare_sql = "prepare '12.45' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step1)
        prepare_sql = "prepare b'1' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step1)

        step2 = 'step2:stmt_name参数为字母 expect:参数名带引号时，合理报错'
        self.log.info(step2)
        prepare_sql = "prepare a from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step2)
        prepare_sql = "prepare asdafg from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step2)
        prepare_sql = "prepare aaaaa from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step2)
        prepare_sql = "prepare 'a' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step2)
        prepare_sql = "prepare 'qesdsdf' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step2)
        prepare_sql = "prepare 'bbbb' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step2)

        step3 = 'step3:stmt_name参数为汉字 expect:参数名带引号时，合理报错'
        self.log.info(step3)
        prepare_sql = "prepare 哈哈 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step3)
        prepare_sql = "prepare '哈哈' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step3)

        step4 = 'step4:stmt_name参数为特殊符号字 expect:合理报错'
        self.log.info(step4)
        prepare_sql = "prepare &% from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step4)
        prepare_sql = "prepare '&%' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step4)

        step5 = 'step5:stmt_name参数为特殊值 expect:合理报错'
        self.log.info(step5)
        prepare_sql = "prepare '' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)
        prepare_sql = "prepare ' ' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)
        prepare_sql = "prepare null from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)
        prepare_sql = "prepare "" from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)
        prepare_sql = "prepare " " from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)
        prepare_sql = "prepare  from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)
        prepare_sql = "prepare b,c from 'select 2';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)
        prepare_sql = "prepare b c from 'select 2';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step5)

        step6 = 'step6:stmt_name参数为关键字;expect:合理报错'
        self.log.info(step6)
        prepare_sql = "prepare for from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step6)
        prepare_sql = "prepare 'for' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step6)
        prepare_sql = "prepare user from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step6)
        prepare_sql = "prepare 'user' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step6)

        step7 = 'step7:stmt_name参数为数字、字母混合;expect:参数名带引号或者参数以数字开头时，合理报错'
        self.log.info(step7)
        prepare_sql = "prepare a1 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare 123aaa from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare a1b from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare 12ab34 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare 1a2b3c4d from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare 'a1' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare '123aaa' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare 'a1b' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare '12ab34' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)
        prepare_sql = "prepare '1a2b3c4d' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step7)

        step8 = 'step8:stmt_name参数为符号、字母混合;expect:合理报错'
        self.log.info(step8)
        prepare_sql = "prepare a& from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step8)
        prepare_sql = "prepare %b from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step8)
        prepare_sql = "prepare 'a&' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step8)
        prepare_sql = "prepare '%b' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step8)

        step9 = 'step9:stmt_name参数为汉字、字母混合;expect:参数名带引号时，合理报错'
        self.log.info(step9)
        prepare_sql = "prepare a哈 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step9)
        prepare_sql = "prepare 呵b from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step9)
        prepare_sql = "prepare 'a哈' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step9)
        prepare_sql = "prepare '呵b' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step9)

        step10 = 'step10:stmt_name参数为汉字、符号混合;expect:合理报错'
        self.log.info(step10)
        prepare_sql = "prepare 哈% from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step10)
        prepare_sql = "prepare &哼 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step10)
        prepare_sql = "prepare '哈%' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step10)
        prepare_sql = "prepare '&哼' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step10)

        step11 = 'step11:stmt_name参数为汉字、数字混合;expect:参数名带引号或者参数以数字开头时时，合理报错'
        self.log.info(step11)
        prepare_sql = "prepare 发1 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step11)
        prepare_sql = "prepare 12大 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step11)
        prepare_sql = "prepare '发1' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step11)
        prepare_sql = "prepare '12大' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step11)

        step12 = 'step12:stmt_name参数为数字、符号混合;expect:合理报错'
        self.log.info(step12)
        prepare_sql = "prepare 1& from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step12)
        prepare_sql = "prepare %2 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step12)
        prepare_sql = "prepare '1&' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step12)
        prepare_sql = "prepare '%2' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step12)

        step13 = 'step13:stmt_name参数为汉字、符号、数字、字母混合;expect:参数名带特殊符号或者参数以数字开头时或者带引号时，合理报错'
        self.log.info(step13)
        prepare_sql = "prepare 1a哈 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare aa11哈哈 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare 哈哈111aaa from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare 哈aa11 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare aa__11哈哈 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("PREPARE", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare %1a哈 from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare 哈哈&&111aaa from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare 哈aa11&& from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare '1a哈' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare 'aa11哈哈' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare '哈哈111aaa' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare '哈aa11' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare '%1a哈' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare 'aa%%11哈哈' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare '哈哈&&111aaa' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)
        prepare_sql = "prepare '哈aa11&&' from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step13)

        step14 = 'step14:step14:stmt_name参数为时间类型;expect:合理报错'
        self.log.info(step14)
        prepare_sql = "prepare '2000-12-12'::date from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step14)
        prepare_sql = "prepare '2000-12-12 00:00:00'::time from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step14)
        prepare_sql = "prepare '2000-12-12 00:00:00'::timestamp from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step14)
        prepare_sql = "prepare '2000-12-12 00:00:00'::datetime from 'select 1';"
        self.log.info(prepare_sql)
        prepare_result = self.primary_sh.execut_db_sql(prepare_sql)
        self.assertIn("ERROR:  syntax error", prepare_result, "执行失败" + step14)

    def tearDown(self):
        step15 = 'step15:清理环境 expect:清理环境成功'
        self.log.info(step15)
        clean_sql = "execute a; execute asdafg; execute aaaaa; execute a1; execute 123aaa; execute a1b; " \
                    + "execute 发1; execute a哈; execute 呵b; execute aa11哈哈; execute 哈哈111aaa; execute 哈aa11; " \
                    + "DEALLOCATE PREPARE a; DEALLOCATE PREPARE asdafg; DEALLOCATE PREPARE aaaaa; " \
                    + "DEALLOCATE PREPARE a1; DEALLOCATE PREPARE 123aaa; DEALLOCATE PREPARE a1b; " \
                    + "DEALLOCATE PREPARE 发1; DEALLOCATE PREPARE a哈; DEALLOCATE PREPARE 呵b; " \
                    + "DEALLOCATE PREPARE aa11哈哈; DEALLOCATE PREPARE 哈哈111aaa; DEALLOCATE PREPARE 哈aa11;"
        self.primary_sh.execut_db_sql(clean_sql)
        self.log.info("prepare语句无法跨会话生效，由于自动化用例会跨会话执行这些语句，所以自动化结束时无需清理")
        self.log.info(f'-----{os.path.basename(__file__)} end-----')